package com.google.code.chaotic.rpc;

import java.util.ArrayList;
import java.util.List;

import com.google.code.chaotic.dto.CommutingServiceDto;
import com.google.code.chaotic.dto.ServiceWaypointDto;
import com.google.code.chaotic.shared.AuthException;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("service")
public interface ServiceSvc extends RemoteService {

	// String createService(ServiceDto serviceDto) throws
	// AuthException;

	// void deleteService(String id) throws AuthException;

	int countAllServices(String sessionId) throws AuthException;

	int countOwnServices(String sessionId) throws AuthException;

	List<CommutingServiceDto> listAllServicesPaginated( //
			String sessionId, int pageNo, int fetchSize) //
			throws AuthException;

	List<CommutingServiceDto> listOwnServicesPaginated( //
			String sessionId, int pageNo, int fetchSize) //
			throws AuthException;

	void finalizeService(String sessionId, String serviceId,
			ArrayList<ServiceWaypointDto> waypointDtos) //
			throws AuthException;
}